package com.ideaaedi.zoo.commonbase.constant;

import org.springframework.core.Ordered;

/**
 * AutoConfiguration 的顺序
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
public interface AutoConfigurationConstant {
    
    /**
     * order for {@link com.ideaaedi.zoo.diy.artifact.mybatisplus.ZooMybatisPlusAutoConfiguration}
     */
    int ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER = 100;
    
    /**
     * order for {@link com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration}
     */
    int ZOO_TENANT_AUTO_CONFIGURATION_ORDER = ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER - 1;
    
    /**
     * bean-name for {@link com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration}
     */
    String ZOO_TENANT_AUTO_CONFIGURATION_BEAN_NAME = "com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration";
    
    /**
     * bean-name for {@link com.ideaaedi.zoo.diy.artifact.mybatisplus.ZooMybatisPlusAutoConfiguration#mybatisPlusInterceptor}
     */
    String MYBATIS_PLUS_INTERCEPTOR_BEAN_NAME = "mybatisPlusInterceptor";
    
    /**
     * order for {@link com.ideaaedi.zoo.diy.artifact.logging.micrometer.filter.TraceXdFilter}
     */
    int ZOO_LOGGING_MICROMETER_PRIORITY_ORDER = Ordered.HIGHEST_PRECEDENCE;
    
    /**
     * order for sa-token SaServletFilter
     * @see com.ideaaedi.zoo.diy.artifact.auth.satoken.ZooSaTokenAutoConfiguration#saServletFilter
     */
    int ZOO_SA_TOKEN_AUTH_FILTER_ORDER = 100;
    
    /**
     * order for request-decrypt SaServletFilter
     * @see com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.nested.ReqDecryptProperties#order
     */
    int ZOO_REQ_DECRYPT_FILTER_ORDER = ZOO_SA_TOKEN_AUTH_FILTER_ORDER + 1;
    
    /**
     * order for VisitorTenantFilter
     * @see com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration#visitorTenantFilter
     */
    int ZOO_VISITOR_TENANT_FILTER_ORDER = ZOO_SA_TOKEN_AUTH_FILTER_ORDER + 2;
    
    /**
     * order for response-encrypt response-body advice
     * @see com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.nested.RespEncryptProperties#order
     */
    int ZOO_RESP_ENCRYPT_FILTER_ORDER = Ordered.LOWEST_PRECEDENCE - 100;
    
    /**
     * order for audit log
     * @see com.ideaaedi.zoo.diy.feature.auditlog.api.advice.AuditLogPointcutAdvisor#setOrder
     */
    int ZOO_AUDIT_LOG_COLLECTOR_ORDER = Ordered.HIGHEST_PRECEDENCE + 100;
    
    /**
     * order for field permission
     * @see com.ideaaedi.zoo.diy.feature.fieldperm.api.advice.FieldPermValidator
     */
    int ZOO_FIELD_PERM_VALIDATOR_ORDER = Ordered.HIGHEST_PRECEDENCE + 200;
    
    /**
     * order for field LockAdvice
     * @see com.ideaaedi.zoo.diy.feature.litefeature.api.lock.LockAdvice
     */
    int ZOO_LITE_FEATURE_LOCK_ADVICE_ORDER = Ordered.HIGHEST_PRECEDENCE + 10000;
    
    /**
     * grayscale
     * @see com.ideaaedi.zoo.diy.artifact.grayscale.aspect.advice.GrayscaleAspect
     */
    int ZOO_GRAYSCALE_ASPECT_ORDER = Ordered.LOWEST_PRECEDENCE - 100;
    
    /**
     * order for expression interceptor
     * @see com.ideaaedi.zoo.diy.feature.expression.engine.api.advice.ExpressionReplaceInterceptor
     */
    int ZOO_EXPRESSION_INTERCEPTOR_ORDER = Ordered.LOWEST_PRECEDENCE - 1;
    
    /**
     * order for
     * @see com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.ZooKnife4jAutoConfiguration
     */
    int ZOO_KNIFE4J_AUTO_CONFIGURATION_ORDER = 0;
    
    /**
     * order for
     * @see com.ideaaedi.zoo.diy.artifact.generator.ZooGeneratorAutoConfiguration
     */
    int ZOO_GENERATOR_AUTO_CONFIGURATION_ORDER = ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER + 1;
    
    /**
     * {@link com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.ZooKnife4jAutoConfiguration}的全类名
     */
    String ZOO_KNIFE4J_AUTO_CONFIGURATION_CLASS_LONG_NAME = "com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.ZooKnife4jAutoConfiguration";
    
    /**
     * jackson序列化配置类类名
     * @see com.ideaaedi.zoo.diy.artifact.magicapi.ZooMagicApiAutoConfiguration#jackson2ObjectMapperBuilderCustomizer
     */
    String JACKSON_MAPPER_CUSTOMIZER_BEAN_NAME = "jackson2ObjectMapperBuilderCustomizer";
    
    /**
     * 用于去除加密后返回的字符串两端双引号的过滤器的bean name
     * @see com.ideaaedi.zoo.diy.feature.reqresp.encdec.impl.springmvc.ZooReByBodyAdviceAutoConfiguration#zooMappingJackson2HttpMessageConverter()
     */
    String ZOO_MAPPING_JACKSON2_HTTP_MESSAGE_CONVERTER_BEAN_NAME = "zooMappingJackson2HttpMessageConverter";
}
